#include "ProviderProfileApplication.h"

#include "core/AppSignals.h"

ProviderProfileApplication::ProviderProfileApplication()
    : PropertyProvider()
{
}

void ProviderProfileApplication::initEditor(
    QtTreePropertyBrowser* editor,
    shared_ptr<BaseElement> entity
)
{
    entity_ = dynamic_pointer_cast<uml::ProfileApplication>(entity);
    propertyToId.clear();
    PropertyProvider::initEditor(editor, entity);

    addProperty("isStrict", "isStrict", entity_->isStrict());

}

void ProviderProfileApplication::valueChanged(QtProperty* property, bool value)
{
    QString id = propertyToId[property];
    if (id == "isStrict") {
        entity_->setIsStrict(value);
        emit appSignals->onElementChanged(this, entity_);
    }
}

void ProviderProfileApplication::valueChanged(QtProperty* property, double value)
{
    QString id = propertyToId[property];
    
}

void ProviderProfileApplication::valueChanged(QtProperty* property, int value)
{
    QString id = propertyToId[property];
    
}

void ProviderProfileApplication::valueChanged(QtProperty* property, QString value)
{
    QString id = propertyToId[property];
    
}
